﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace XYX.Http.Mvc
{
    /// <summary>
    /// 控制器解析接口约束
    /// </summary>
    public interface IControllerFactory
    {
        /// <summary>
        /// 创建默认的控制器实例
        /// </summary>
        /// <param name="contorllerName"></param>
        /// <param name="rootPath"></param>
        /// <param name="route"></param>
        /// <returns></returns>
        Type DefaulteController( string contorllerName, string rootPath, Route route);
        /// <summary>
        /// 创建控制器实例
        /// </summary>
        /// <param name="routeData"></param>
        /// <param name="controllerName"></param>
        /// <param name="rootPath"></param>
        /// <param name="route"></param>
        /// <returns></returns>
        RouteData CreateController(RouteData routeData,  string controllerName, string rootPath, Route route);
        
    }
}
